package com.zuowei.ycy.user.http;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by Administrator on 2016/5/6.
 */
public interface Order {

    String module = "Order";

    /**
     * 增加订单
     */
    @FormUrlEncoded
    @POST(module + "/addOrder")
    Call<ResponseBody> addOrder(@Field("m_id") String m_id, @Field("merchant_id") String merchant_id, @Field("delivery_time") String delivery_time, @Field("remark") String remark, @Field("goods_json") String goods_json, @Field("address_id") String address_id);

    /**
     * 订单列表
     *
     * @param m_id
     * @param p
     * @return
     */
    @FormUrlEncoded
    @POST(module + "/orderList")
    Call<ResponseBody> orderList(@Field("m_id") String m_id, @Field("p") String p);

    /**
     * 订单详情
     *
     * @return
     */
    @FormUrlEncoded
    @POST(module + "/orderInfo")
    Call<ResponseBody> orderInfo(@Field("order_id") String order_id);

    /**
     * 订单确认收货
     *
     * @return
     */
    @FormUrlEncoded
    @POST(module + "/confirmOrder")
    Call<ResponseBody> confirmOrder(@Field("order_id") String order_id);

    /**
     * 取消订单
     * @param order_id
     * @return
     */
    @FormUrlEncoded
    @POST(module + "/cancelOrder")
    Call<ResponseBody> cancelOrder(@Field("order_id") String order_id);


    /**
     * 订单评价
     * @param order_id
     * @param score
     * @param content
     * @param delivery_time
     * @return
     */
    @FormUrlEncoded
    @POST(module+"/commentOrder")
    Call<ResponseBody>  commentOrder(@Field("order_id") String order_id, @Field("score") String score, @Field("content") String content, @Field("delivery_time") String delivery_time);

    /**
     * 订单支付装备结果查询
     * @param order_sn
     * @return
     */
    @FormUrlEncoded
    @POST(module+"/findStatus")
    Call<ResponseBody> findStatus(@Field("order_sn") String order_sn);

    /**
     * 余额支付
     * @param order_sn
     * @return
     */
    @FormUrlEncoded
    @POST(module+"/balancePay")
    Call<ResponseBody> balancePay(@Field("order_sn") String order_sn);



}
